home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-10-28 | 71.7 KB | 1,387 lines |
-
-
-
- QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))
-
-
-
- NNNNAAAAMMMMEEEE
- QApplication - Manages the application event queue
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- #include <qapplication.h>
-
- Inherits QObject.
-
- Inherited by QXtApplication.
-
- PPPPuuuubbbblllliiiicccc MMMMeeeemmmmbbbbeeeerrrrssss
- QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn (((( iiiinnnntttt &&&& _a_r_g_c,,,, cccchhhhaaaarrrr ******** aaaarrrrggggvvvv ))))
- vvvviiiirrrrttttuuuuaaaallll ~~~~QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn ()
- iiiinnnntttt aaaarrrrggggcccc (((()))) ccccoooonnnnsssstttt
- cccchhhhaaaarrrr******** aaaarrrrggggvvvv (((()))) ccccoooonnnnsssstttt
- QQQQWWWWiiiiddddggggeeeetttt**** mmmmaaaaiiiinnnnWWWWiiiiddddggggeeeetttt (((()))) ccccoooonnnnsssstttt
- vvvvooooiiiidddd sssseeeettttMMMMaaaaiiiinnnnWWWWiiiiddddggggeeeetttt (((( QQQQWWWWiiiiddddggggeeeetttt **** ))))
- QQQQWWWWiiiiddddggggeeeetttt**** ffffooooccccuuuussssWWWWiiiiddddggggeeeetttt (((()))) ccccoooonnnnsssstttt
- iiiinnnntttt eeeexxxxeeeecccc (((())))
- vvvvooooiiiidddd pppprrrroooocccceeeessssssssEEEEvvvveeeennnnttttssss (((())))
- vvvvooooiiiidddd pppprrrroooocccceeeessssssssEEEEvvvveeeennnnttttssss (((( iiiinnnntttt mmmmaaaaxxxxttttiiiimmmmeeee ))))
- vvvvooooiiiidddd pppprrrroooocccceeeessssssssOOOOnnnneeeeEEEEvvvveeeennnntttt (((())))
- iiiinnnntttt eeeennnntttteeeerrrr____lllloooooooopppp (((())))
- vvvvooooiiiidddd eeeexxxxiiiitttt____lllloooooooopppp (((())))
- vvvviiiirrrrttttuuuuaaaallll bbbboooooooollll nnnnoooottttiiiiffffyyyy (((( QQQQOOOObbbbjjjjeeeecccctttt ****,,,, QQQQEEEEvvvveeeennnntttt **** ))))
-
- PPPPuuuubbbblllliiiicccc SSSSlllloooottttssss
- vvvvooooiiiidddd qqqquuuuiiiitttt (((())))
-
- SSSSiiiiggggnnnnaaaallllssss
- vvvvooooiiiidddd llllaaaassssttttWWWWiiiinnnnddddoooowwwwCCCClllloooosssseeeedddd (((())))
-
- SSSSttttaaaattttiiiicccc PPPPuuuubbbblllliiiicccc MMMMeeeemmmmbbbbeeeerrrrssss
- GGGGUUUUIIIISSSSttttyyyylllleeee ssssttttyyyylllleeee (((())))
- vvvvooooiiiidddd sssseeeettttSSSSttttyyyylllleeee (((( GGGGUUUUIIIISSSSttttyyyylllleeee ))))
- iiiinnnntttt ccccoooolllloooorrrrSSSSppppeeeecccc (((())))
- vvvvooooiiiidddd sssseeeettttCCCCoooolllloooorrrrSSSSppppeeeecccc (((( iiiinnnntttt ))))
- QQQQCCCCuuuurrrrssssoooorrrr**** oooovvvveeeerrrrrrrriiiiddddeeeeCCCCuuuurrrrssssoooorrrr (((())))
- vvvvooooiiiidddd sssseeeettttOOOOvvvveeeerrrrrrrriiiiddddeeeeCCCCuuuurrrrssssoooorrrr (((( ccccoooonnnnsssstttt QQQQCCCCuuuurrrrssssoooorrrr &&&&,,,, bbbboooooooollll _r_e_p_l_a_c_e====FFFFAAAALLLLSSSSEEEE
- ))))
- vvvvooooiiiidddd rrrreeeessssttttoooorrrreeeeOOOOvvvveeeerrrrrrrriiiiddddeeeeCCCCuuuurrrrssssoooorrrr (((())))
- bbbboooooooollll hhhhaaaassssGGGGlllloooobbbbaaaallllMMMMoooouuuusssseeeeTTTTrrrraaaacccckkkkiiiinnnngggg (((())))
- vvvvooooiiiidddd sssseeeettttGGGGlllloooobbbbaaaallllMMMMoooouuuusssseeeeTTTTrrrraaaacccckkkkiiiinnnngggg (((( bbbboooooooollll eeeennnnaaaabbbblllleeee ))))
- QQQQPPPPaaaalllleeeetttttttteeee**** ppppaaaalllleeeetttttttteeee (((())))
- vvvvooooiiiidddd sssseeeettttPPPPaaaalllleeeetttttttteeee (((( ccccoooonnnnsssstttt QQQQPPPPaaaalllleeeetttttttteeee &&&&,,,, bbbboooooooollll
- _u_p_d_a_t_e_A_l_l_W_i_d_g_e_t_s====FFFFAAAALLLLSSSSEEEE ))))
- QQQQFFFFoooonnnntttt**** ffffoooonnnntttt (((())))
- vvvvooooiiiidddd sssseeeettttFFFFoooonnnntttt (((( ccccoooonnnnsssstttt QQQQFFFFoooonnnntttt &&&&,,,, bbbboooooooollll _u_p_d_a_t_e_A_l_l_W_i_d_g_e_t_s====FFFFAAAALLLLSSSSEEEE ))))
- QQQQFFFFoooonnnnttttMMMMeeeettttrrrriiiiccccssss ffffoooonnnnttttMMMMeeeettttrrrriiiiccccssss (((())))
- QQQQWWWWiiiiddddggggeeeettttLLLLiiiisssstttt**** aaaallllllllWWWWiiiiddddggggeeeettttssss (((())))
- QQQQWWWWiiiiddddggggeeeettttLLLLiiiisssstttt**** ttttooooppppLLLLeeeevvvveeeellllWWWWiiiiddddggggeeeettttssss (((())))
- QQQQWWWWiiiiddddggggeeeetttt**** ddddeeeesssskkkkttttoooopppp (((())))
-
-
-
- Page 1 (printed 9/22/98)
-
-
-
-
-
-
- QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))
-
-
-
- QQQQWWWWiiiiddddggggeeeetttt**** aaaaccccttttiiiivvvveeeePPPPooooppppuuuuppppWWWWiiiiddddggggeeeetttt (((())))
- QQQQWWWWiiiiddddggggeeeetttt**** aaaaccccttttiiiivvvveeeeMMMMooooddddaaaallllWWWWiiiiddddggggeeeetttt (((())))
- QQQQCCCClllliiiippppbbbbooooaaaarrrrdddd**** cccclllliiiippppbbbbooooaaaarrrrdddd (((())))
- QQQQWWWWiiiiddddggggeeeetttt**** wwwwiiiiddddggggeeeettttAAAAtttt (((( iiiinnnntttt _x,,,, iiiinnnntttt _y,,,, bbbboooooooollll _c_h_i_l_d
- QQQQWWWWiiiiddddggggeeeetttt**** wwwwiiiiddddggggeeeettttAAAAtttt (((( ccccoooonnnnsssstttt QQQQPPPPooooiiiinnnntttt &&&&,,,, bbbboooooooollll _c_h_i_l_d====FFFFAAAALLLLSSSSEEEE ))))
- vvvvooooiiiidddd eeeexxxxiiiitttt (((( iiiinnnntttt _r_e_t_c_o_d_e====0000 ))))
- bbbboooooooollll sssseeeennnnddddEEEEvvvveeeennnntttt (((( QQQQOOOObbbbjjjjeeeecccctttt **** _r_e_c_e_i_v_e_r,,,, QQQQEEEEvvvveeeennnntttt **** eeeevvvveeeennnntttt ))))
- vvvvooooiiiidddd ppppoooossssttttEEEEvvvveeeennnntttt (((( QQQQOOOObbbbjjjjeeeecccctttt **** _r_e_c_e_i_v_e_r,,,, QQQQEEEEvvvveeeennnntttt **** eeeevvvveeeennnntttt ))))
- vvvvooooiiiidddd sssseeeennnnddddPPPPoooosssstttteeeeddddEEEEvvvveeeennnnttttssss (((( QQQQOOOObbbbjjjjeeeecccctttt **** _r_e_c_e_i_v_e_r,,,, iiiinnnntttt eeeevvvveeeennnntttt____ttttyyyyppppeeee ))))
- bbbboooooooollll ssssttttaaaarrrrttttiiiinnnnggggUUUUpppp (((())))
- bbbboooooooollll cccclllloooossssiiiinnnnggggDDDDoooowwwwnnnn (((())))
- vvvvooooiiiidddd fffflllluuuusssshhhhXXXX (((())))
- vvvvooooiiiidddd ssssyyyynnnnccccXXXX (((())))
- vvvvooooiiiidddd bbbbeeeeeeeepppp (((())))
- vvvvooooiiiidddd sssseeeettttWWWWiiiinnnnSSSSttttyyyylllleeeeHHHHiiiigggghhhhlllliiiigggghhhhttttCCCCoooolllloooorrrr (((( ccccoooonnnnsssstttt QQQQCCCCoooolllloooorrrr &&&& ))))
- ccccoooonnnnsssstttt QQQQCCCCoooolllloooorrrr&&&& wwwwiiiinnnnSSSSttttyyyylllleeeeHHHHiiiigggghhhhlllliiiigggghhhhttttCCCCoooolllloooorrrr (((())))
- vvvvooooiiiidddd sssseeeettttDDDDoooouuuubbbblllleeeeCCCClllliiiicccckkkkIIIInnnntttteeeerrrrvvvvaaaallll (((( iiiinnnntttt ))))
- iiiinnnntttt ddddoooouuuubbbblllleeeeCCCClllliiiicccckkkkIIIInnnntttteeeerrrrvvvvaaaallll (((())))
-
- RRRREEEELLLLAAAATTTTEEEEDDDD FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDOOOOCCCCUUUUMMMMEEEENNNNTTTTAAAATTTTIIIIOOOONNNN
- (Note that these are not member functions.)
- vvvvooooiiiidddd qqqqAAAAddddddddPPPPoooossssttttRRRRoooouuuuttttiiiinnnneeee ((((CCCClllleeeeaaaannnnUUUUppppFFFFuuuunnnnccccttttiiiioooonnnn _p))))
- ccccoooonnnnsssstttt cccchhhhaaaarrrr **** qqqqVVVVeeeerrrrssssiiiioooonnnn (((())))
- bbbboooooooollll qqqqSSSSyyyyssssIIIInnnnffffoooo ((((iiiinnnntttt **** _w_o_r_d_S_i_z_e,,,, bbbboooooooollll **** _b_i_g_E_n_d_i_a_n))))
- vvvvooooiiiidddd ddddeeeebbbbuuuugggg ((((ccccoooonnnnsssstttt cccchhhhaaaarrrr **** _m_s_g,,,, ............))))
- vvvvooooiiiidddd wwwwaaaarrrrnnnniiiinnnngggg ((((ccccoooonnnnsssstttt cccchhhhaaaarrrr **** _m_s_g,,,, ............))))
- vvvvooooiiiidddd ffffaaaattttaaaallll ((((ccccoooonnnnsssstttt cccchhhhaaaarrrr **** _m_s_g,,,, ............))))
- vvvvooooiiiidddd AAAASSSSSSSSEEEERRRRTTTT ((((bbbboooooooollll _t_e_s_t))))
- vvvvooooiiiidddd CCCCHHHHEEEECCCCKKKK____PPPPTTTTRRRR ((((vvvvooooiiiidddd **** _p))))
- mmmmssssgggg____hhhhaaaannnnddddlllleeeerrrr qqqqIIIInnnnssssttttaaaallllllllMMMMssssggggHHHHaaaannnnddddlllleeeerrrr ((((mmmmssssgggg____hhhhaaaannnnddddlllleeeerrrr _h))))
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- The QApplication class manages the application event queue.
-
- The QApplication class is central to Qt. It receives events
- from the underlying window system and sends them to the
- destination widgets. An application object must be created
- before any widgets can be created!
-
- Only one single QApplication object should be created. In
- fact Qt complains if you create more than one, and this is
- normally done in the main() function. Once a QApplication
- object has been created, qApp (defined as extern
- QApplication *qApp) refers to this object.
-
- Example (a complete Qt application):
-
- #include <qapplication.h> // defines QApplication
- #include <qpushbutton.h> // defines QPushButton
- int main( int argc, char **argv )
- {
- QApplication app( argc, argv ); // create application object
-
-
-
- Page 2 (printed 9/22/98)
-
-
-
-
-
-
- QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))
-
-
-
- QPushButton hello( "Hello, world!" ); // create a push button
- app.setMainWidget( &hello ); // define as main widget
- connect( &hello, SIGNAL(clicked()), // clicking the button
- &app, SLOT(quit()) ); // quits the application
- hello.show(); // show button
- return app.exec(); // run main event loop
- }
-
- IIIImmmmppppoooorrrrttttaaaannnntttt
- Notice that the QApplication object must be created before
- any window-system functionality of Qt is used, this includes
- widgets, colors, fonts etc.
-
- Note also that for X11, setMainWidget() may change the main
- widget according to the -_g_e_o_m_e_t_r_y option. To preserve this
- functionality, you must set your defaults before
- setMainWidget() and any overrides after.
-
- While Qt is not optimized or designed for writing non-GUI
- programs, it's possible to use some of its classes without
- creating a QApplication. This can be very useful if you wish
- to share code between a non-GUI server and a GUI client.
-
- Examples: forever/forever.cpp desktop/desktop.cpp
- connect/connect.cpp drawdemo/drawdemo.cpp movies/main.cpp
- picture/picture.cpp xform/xform.cpp menu/menu.cpp
- progress/progress.cpp cursor/cursor.cpp layout/layout.cpp
- qmag/qmag.cpp widgets/widgets.cpp
-
- MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDOOOOCCCCUUUUMMMMEEEENNNNTTTTAAAATTTTIIIIOOOONNNN
- QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn (((( iiiinnnntttt &&&& aaaarrrrggggcccc,,,, cccchhhhaaaarrrr ******** aaaarrrrggggvvvv ))))
- Initializes the window system and onstructs an application
- object with the command line arguments _a_r_g_c and _a_r_g_v.
-
- The global qApp pointer refers to this application object.
- Only one application object should be created.
-
- This application object must be constructed before any paint
- devices (includes widgets, pixmaps, bitmaps etc.)
-
- Notice that _a_r_g_c and _a_r_g_v might be changed. Qt removes
- command line arguments that it recognizes. _a_r_g_c and _a_r_g_v are
- can be accessed later by qApp->argc() and qApp->argv(). The
- documentation for argv() contains a detailed description of
- how to process command line arguments.
-
- Qt debugging options:
-
- -nograb, tells Qt to never grab the mouse or the keyboard.
-
- debugging.
- -sync (only under X11), switches to synchronous mode for
-
-
-
- Page 3 (printed 9/22/98)
-
-
-
-
-
-
- QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))
-
-
-
- See Debugging Techniques for a more detailed explanation.
-
- The X11 version of Qt supports a few more command line
- options:
-
- -display _d_i_s_p_l_a_y, sets the X display (default is $DISPLAY).
-
- -
- geometry _g_e_o_m_e_t_r_y, sets the client geometry of the main widget.
-
- -fn or -font _f_o_n_t, defines the application font.
-
- an application palette (light and dark shades are calculated).
- -bg or -
- background _c_o_l_o_r, sets the default background color and
-
- -fg or -foreground _c_o_l_o_r, sets the default foreground color.
-
- -name _n_a_m_e, sets the application name.
-
- -title _t_i_t_l_e, sets the application title (caption).
-
- are motif and windows
- -
- style= _s_t_y_l_e, sets the application GUI style. Possible values
-
- visual on an 8-bit display.
- -visual TrueColor, forces the application to use a TrueColor
-
- cube on a 8-bit display, if the application is using the
- QApplication::ManyColor color specification. If _c_o_u_n_t is 216 then
- a 6x6x6 color cube is used (ie. 6 levels of red, 6 of green, and
- 6 of blue); for 108, a 3x3x3, and for other values, a cube
- approximately proportional to a 2x3x1 cube is used.
- -
- ncols _c_o_u_n_t, limits the number of colors allocated in the color
-
- an 8-bit display.
- -
- cmap, causes the application to install a private color map on
-
- See also: argc() and argv().
-
- QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::~~~~QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn (((()))) [[[[vvvviiiirrrrttttuuuuaaaallll]]]]
- Deletes all remaining widgets and cleans up any window
- system resources that were allocated by this application.
- Sets the global variable qApp to null.
-
- QQQQWWWWiiiiddddggggeeeetttt **** QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::aaaaccccttttiiiivvvveeeeMMMMooooddddaaaallllWWWWiiiiddddggggeeeetttt (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
- Returns the active modal widget.
-
- A modal widget is a special top level widget which is a
-
-
-
- Page 4 (printed 9/22/98)
-
-
-
-
-
-
- QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))
-
-
-
- subclass of QDialog that specifies the modal parameter of
- the constructor to TRUE. A modal widget must be finished
- before the user can continue with other parts of the
- program.
-
- The modal widgets are organized in a stack. This function
- returns the active modal widget on top of the stack.
-
- See also: currentPopupWidget() and topLevelWidgets().
-
- QQQQWWWWiiiiddddggggeeeetttt **** QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::aaaaccccttttiiiivvvveeeePPPPooooppppuuuuppppWWWWiiiiddddggggeeeetttt (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
- Returns the active popup widget.
-
- A popup widget is a special top level widget that sets the
- WType_Popup widget flag, e.g. the QPopupMenu widget. When
- the application opens a popup widget, all events are sent to
- the popup and normal widgets and modal widgets cannot be
- accessed before the popup widget is closed.
-
- Only other popup widgets may be opened when a popup widget
- is shown. The popup widgets are organized in a stack. This
- function returns the active popup widget on top of the
- stack.
-
- See also: currentModalWidget() and topLevelWidgets().
-
- QQQQWWWWiiiiddddggggeeeettttLLLLiiiisssstttt **** QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::aaaallllllllWWWWiiiiddddggggeeeettttssss (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
- Returns a list of all the widgets in the application.
-
- The list is created using new and must be deleted by the
- caller.
-
- The list is empty if there are no widgets.
-
- Note that some of the widgets may be hidden.
-
- Example:
-
- //
- // Updates all widgets.
- //
- QWidgetList *list = QApplication::allWidgets();
- QWidgetListIt it( *list ); // iterate over the widgets
- while ( it.current() ) { // for each top level widget...
- it.current()->update();
- ++it;
- }
- delete list; // delete the list, not the widgets
-
- The QWidgetList class is defined in the qwidcoll.h header
- file.
-
-
-
-
- Page 5 (printed 9/22/98)
-
-
-
-
-
-
- QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))
-
-
-
- WWWWaaaarrrrnnnniiiinnnngggg:::: Delete the list away as soon you have finished
- using it. You can get in serious trouble if you for instance
- try to access a widget that has been deleted.
-
- See also: topLevelWidgets(), QWidget::isVisible() and
- QList::isEmpty(),.
-
- iiiinnnntttt QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::aaaarrrrggggcccc (((()))) ccccoooonnnnsssstttt
- Returns the number of command line arguments.
-
- The documentation for argv() contains a detailed description
- of how to process command line arguments.
-
- See also: argv() and QApplication::QApplication().
-
- cccchhhhaaaarrrr ******** QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::aaaarrrrggggvvvv (((()))) ccccoooonnnnsssstttt
- Returns the command line argument vector.
-
- argv()[0] is the program name, argv()[1] is the first
- argument and argv()[argc()-1] is the last argument.
-
- A QApplication object is constructed by passing _a_r_g_c and
- _a_r_g_v from the main() function. Some of the arguments may be
- recognized as Qt options removed from the argument vector.
- For example, the X11 version of Qt knows about -display,
- -font and a few more options.
-
- Example:
-
- // showargs.cpp - displays program arguments in a list box
- #include <qapplication.h>
- #include <qlistbox.h>
- int main( int argc, char **argv )
- {
- QApplication a( argc, argv );
- QListBox b;
- a.setMainWidget( &b );
- for ( int i=0; i<a.argc(); i++ ) // a.argc() == argc
- b.insertItem( a.argv()[i] ); // a.argv()[i] == argv[i]
- b.show();
- return a.exec();
- }
-
- If you run showargs -display unix:0 -font 9x15bold hello
- world under X11, the list box contains the three strings
- "showargs", "hello" and "world".
-
- See also: argc() and QApplication::QApplication().
-
- vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::bbbbeeeeeeeepppp (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
- Sounds the bell, using the default volume and sound.
-
-
-
-
- Page 6 (printed 9/22/98)
-
-
-
-
-
-
- QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))
-
-
-
- QQQQCCCClllliiiippppbbbbooooaaaarrrrdddd **** QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::cccclllliiiippppbbbbooooaaaarrrrdddd (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
- Returns a pointer to the application global clipboard.
-
- bbbboooooooollll QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::cccclllloooossssiiiinnnnggggDDDDoooowwwwnnnn (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
- Returns TRUE if the application objects are being destroyed.
-
- See also: startingUp().
-
- iiiinnnntttt QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::ccccoooolllloooorrrrSSSSppppeeeecccc (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
- Returns the color specification.
-
- See also: QApplication::setColorSpec().
-
- Examples: showimg/showimg.cpp
-
- QQQQWWWWiiiiddddggggeeeetttt **** QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::ddddeeeesssskkkkttttoooopppp (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
- Returns the desktop widget (also called the root window).
-
- The desktop widget is useful for obtaining the size of the
- screen. It can also be used to draw on the desktop.
-
- QWidget *d = QApplication::desktop();
- int w=d->width(); // returns screen width
- int h=d->height(); // returns screen height
- d->setBackgroundColor( red ); // makes desktop red
-
- Examples: qmag/qmag.cpp
-
- iiiinnnntttt QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::ddddoooouuuubbbblllleeeeCCCClllliiiicccckkkkIIIInnnntttteeeerrrrvvvvaaaallll (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
- Returns the maximum duration for a double click.
-
- See also: setDoubleClickInterval().
-
- iiiinnnntttt QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::eeeennnntttteeeerrrr____lllloooooooopppp (((())))
- This function enters the main event loop (recursively). Do
- not call it unless you are an expert.
-
- See also: exit_loop().
-
- iiiinnnntttt QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::eeeexxxxeeeecccc (((())))
- Enters the main event loop and waits until exit() is called
- or the main widget is destroyed. Returns the value that was
- specified to exit(), which is 0 if exit() is called via
- quit().
-
- It is necessary to call this function to start event
- handling. The main event loop receives events from the
- window system and dispatches these to the application
- widgets.
-
- Generally, no user interaction can take place before calling
- exec(). As a special case, modal widgets like QMessageBox
-
-
-
- Page 7 (printed 9/22/98)
-
-
-
-
-
-
- QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))
-
-
-
- can be used before calling exec(), because modal widget have
- a local event loop.
-
- See also: quit(), exit(), processEvents() and
- setMainWidget().
-
- Examples: forever/forever.cpp connect/connect.cpp
- mainlyQt/editor.cpp drawdemo/drawdemo.cpp movies/main.cpp
- picture/picture.cpp xform/xform.cpp menu/menu.cpp
- progress/progress.cpp cursor/cursor.cpp layout/layout.cpp
- qmag/qmag.cpp widgets/widgets.cpp
-
- vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::eeeexxxxiiiitttt (((( iiiinnnntttt rrrreeeettttccccooooddddeeee====0000 )))) [[[[ssssttttaaaattttiiiicccc]]]]
- Tells the application to exit with a return code.
-
- After this function has been called, the application leaves
- the main event loop and returns from the call to exec(). The
- exec() function returns _r_e_t_c_o_d_e.
-
- By convention, _r_e_t_c_o_d_e 0 means success, any non-zero value
- indicates an error.
-
- Note that unlike the C library exit function, this function
- _d_o_e_s returns to the caller - it is event processing that
- stops.
-
- See also: quit() and exec().
-
- Examples: picture/picture.cpp
-
- vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::eeeexxxxiiiitttt____lllloooooooopppp (((())))
- This function leaves from a recursive call to the main event
- loop. Do not call it unless you are an expert.
-
- See also: enter_loop().
-
- vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::fffflllluuuusssshhhhXXXX (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
- Flushes the X event queue in the X11 implementation. Does
- nothing on other platforms.
-
- See also: syncX().
-
- QQQQWWWWiiiiddddggggeeeetttt **** QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::ffffooooccccuuuussssWWWWiiiiddddggggeeeetttt (((()))) ccccoooonnnnsssstttt
- Returns the application widget that has the keyboard input
- focus, or null if no application widget has the focus.
-
- See also: QWidget::setFocus() and QWidget::hasFocus().
-
- QQQQFFFFoooonnnntttt **** QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::ffffoooonnnntttt (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
- Returns the default application font. There is always an
- application font, i.e. the returned pointer is guaranteed to
- be non-null.
-
-
-
- Page 8 (printed 9/22/98)
-
-
-
-
-
-
- QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))
-
-
-
- See also: setFont(), fontMetrics() and QWidget::font().
-
- QQQQFFFFoooonnnnttttMMMMeeeettttrrrriiiiccccssss QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::ffffoooonnnnttttMMMMeeeettttrrrriiiiccccssss (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
- Returns display (screen) font metrics for the application
- font.
-
- See also: font(), setFont(), QWidget::fontMetrics() and
- QPainter::fontMetrics().
-
- bbbboooooooollll QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::hhhhaaaassssGGGGlllloooobbbbaaaallllMMMMoooouuuusssseeeeTTTTrrrraaaacccckkkkiiiinnnngggg (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
- Returns TRUE if global mouse tracking is enabled, otherwise
- FALSE.
-
- See also: setGlobalMouseTracking().
-
- vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::llllaaaassssttttWWWWiiiinnnnddddoooowwwwCCCClllloooosssseeeedddd (((()))) [[[[ssssiiiiggggnnnnaaaallll]]]]
- This signal is emitted when the user has closed a top level
- widget and there are no more visible top level widgets left.
-
- The signal is very useful when your application has many top
- level widgets but no main widget. You can then connect it to
- the quit() slot.
-
- See also: mainWidget(), topLevelWidgets() and
- QWidget::isTopLevel().
-
- QQQQWWWWiiiiddddggggeeeetttt **** QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::mmmmaaaaiiiinnnnWWWWiiiiddddggggeeeetttt (((()))) ccccoooonnnnsssstttt
- Returns the main application widget, or 0 if there is not a
- defined main widget.
-
- See also: setMainWidget().
-
- bbbboooooooollll QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::nnnnoooottttiiiiffffyyyy (((( QQQQOOOObbbbjjjjeeeecccctttt **** rrrreeeecccceeeeiiiivvvveeeerrrr,,,, QQQQEEEEvvvveeeennnntttt **** eeeevvvveeeennnntttt ))))
- [[[[vvvviiiirrrrttttuuuuaaaallll]]]]
- Sends _e_v_e_n_t to _r_e_c_e_i_v_e_r: receiver->event( event ) Returns
- the value that is returned from the receiver's event
- handler.
-
- Reimplementing this virtual function is one of five ways to
- process an event:
-
- 1 Reimplementing this function. Very powerful, you get
- _c_o_m_p_l_e_t_e control, but of course only one subclass can
- be qApp.
-
- 2 Installing an event filter on qApp. Such an event
- filter gets to process all events for all widgets, so
- it's just as powerful as reimplementing notify(), and
- in this way it's possible to have more than one
- application-global event filter. Global event filter
- get to see even mouse events for disabled widgets, and
- if global mouse tracking is enabled, mouse move events
-
-
-
- Page 9 (printed 9/22/98)
-
-
-
-
-
-
- QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))
-
-
-
- for all widgets.
-
- 3 Reimplementing QObject::event() (as QWidget does). If
- you do this you get tab key-presses, and you get to see
- the events before any widget-specific event filters.
-
- 4 Installing an event filter on the object. Such an even
- filter gets all the events except Tab and Shift-Tab key
- presses.
-
- 5 Finally, reimplementing paintEvent(), mousePressEvent()
- and so on. This is the normal, easist and least
- powerful way.
-
- See also: QObject::event() and installEventFilter().
-
- QQQQCCCCuuuurrrrssssoooorrrr **** QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::oooovvvveeeerrrrrrrriiiiddddeeeeCCCCuuuurrrrssssoooorrrr (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
- Returns the active application override cursor.
-
- This function returns 0 if no application cursor has been
- defined (i.e. the internal cursor stack is empty).
-
- See also: setOverrideCursor() and restoreOverrideCursor().
-
- QQQQPPPPaaaalllleeeetttttttteeee **** QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::ppppaaaalllleeeetttttttteeee (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
- Returns a pointer to the default application palette. There
- is always an application palette, i.e. the returned pointer
- is guaranteed to be non-null.
-
- See also: setPalette() and QWidget::palette().
-
- vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::ppppoooossssttttEEEEvvvveeeennnntttt (((( QQQQOOOObbbbjjjjeeeecccctttt **** rrrreeeecccceeeeiiiivvvveeeerrrr,,,, QQQQEEEEvvvveeeennnntttt **** eeeevvvveeeennnntttt
- )))) [[[[ssssttttaaaattttiiiicccc]]]]
- Stores the event in a queue and returns immediatly.
-
- The event must be allocated on the heap, as it is deleted
- when the event has been posted.
-
- When control returns to the main event loop, all events that
- are stored in the queue will be sent using the notify()
- function.
-
- See also: sendEvent().
-
- vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::pppprrrroooocccceeeessssssssEEEEvvvveeeennnnttttssss (((())))
- Processes pending events, for 3 seconds or until there are
- no more events to process, then return.
-
- You can call this function occasionally when your program is
- busy doing a long operation (e.g. copying a file).
-
- vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::pppprrrroooocccceeeessssssssEEEEvvvveeeennnnttttssss (((( iiiinnnntttt mmmmaaaaxxxxttttiiiimmmmeeee ))))
-
-
-
- PPPPaaaaggggeeee 11110000 ((((pppprrrriiiinnnntttteeeedddd 9999////22222222////99998888))))
-
-
-
-
-
-
- QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))
-
-
-
- Processes pending events, for _m_a_x_t_i_m_e milliseconds or until
- there are no more events to process, then return.
-
- You can call this function occasionally when you program is
- busy doing a long operation (e.g. copying a file).
-
- vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::pppprrrroooocccceeeessssssssOOOOnnnneeeeEEEEvvvveeeennnntttt (((())))
- Waits for an event to occur, processes it, then returns.
-
- This function is useful for adapting Qt to situations where
- the event processing must be grafted into existing program
- loops. Beware that using this function in new applications
- may be an indication of design problems.
-
- vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::qqqquuuuiiiitttt (((()))) [[[[ssssllllooootttt]]]]
- Tells the application to exit with return code 0 (success).
- Equivalent to calling QApplication::exit( 0 ).
-
- This function is a slot, i.e. you may connect any signal to
- activate quit().
-
- Example:
-
- QPushButton *quitButton = new QPushButton( "Quit" );
- connect( quitButton, SIGNAL(clicked()), qApp, SLOT(quit()) );
-
- See also: exit().
-
- vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::rrrreeeessssttttoooorrrreeeeOOOOvvvveeeerrrrrrrriiiiddddeeeeCCCCuuuurrrrssssoooorrrr (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
- Restores the effect of setOverrideCursor().
-
- If setOverrideCursor() has been called twice, calling
- restoreOverrideCursor() will activate the first cursor set.
- Calling this function a second time restores the original
- widgets cursors.
-
- Application cursors are stored on an internal stack.
- setOverrideCursor() pushes the cursor onto the stack, and
- restoreOverrideCursor() pops the active cursor off the
- stack. Every setOverrideCursor() must have an corresponding
- restoreOverrideCursor(), otherwise the stack will get out of
- sync. overrideCursor() returns 0 if the cursor stack is
- empty.
-
- See also: setOverrideCursor() and overrideCursor().
-
- Examples: showimg/showimg.cpp
-
- bbbboooooooollll QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::sssseeeennnnddddEEEEvvvveeeennnntttt (((( QQQQOOOObbbbjjjjeeeecccctttt **** rrrreeeecccceeeeiiiivvvveeeerrrr,,,, QQQQEEEEvvvveeeennnntttt **** eeeevvvveeeennnntttt
- )))) [[[[ssssttttaaaattttiiiicccc]]]]
- Sends an event directly to a receiver, using the notify()
- function. Returns the value that was returned from the event
-
-
-
- Page 11 (printed 9/22/98)
-
-
-
-
-
-
- QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))
-
-
-
- handler.
-
- See also: postEvent() and notify().
-
- vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::sssseeeennnnddddPPPPoooosssstttteeeeddddEEEEvvvveeeennnnttttssss (((( QQQQOOOObbbbjjjjeeeecccctttt **** rrrreeeecccceeeeiiiivvvveeeerrrr,,,, iiiinnnntttt
- eeeevvvveeeennnntttt____ttttyyyyppppeeee )))) [[[[ssssttttaaaattttiiiicccc]]]]
- Immediately dispatches all events which have been previously
- enqueued with QApplication::postEvent() and which are for
- the object _r_e_c_e_i_v_e_r and have the _e_v_e_n_t__t_y_p_e.
-
- Some event compression may occur. Note that events from the
- window system are _n_o_t dispatched by this function.
-
- vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::sssseeeettttCCCCoooolllloooorrrrSSSSppppeeeecccc (((( iiiinnnntttt ssssppppeeeecccc )))) [[[[ssssttttaaaattttiiiicccc]]]]
- Sets the color specification for the application to _s_p_e_c.
-
- The color specification controls how your application
- allocates colors. You must set the color specification
- before you create the QApplication object.
-
- The choices are:
-
- strategy. Use this choice if your application uses buttons,
- menus, texts and pixmaps with few colors. With this choice, the
- application allocates system global colors. This work fine for
- most applications under X11, but Windows dithers to the 20
- standard colors unless the display has true color support (more
- than 256 colors).
- QApplication::NormalColor. This is the default color allocation
-
-
-
- needs a small number of custom colors. This choice only makes a
- difference on Windows - the application gets more colors when it
- is active, but the background windows look less good. Under X11
- this is the same as NormalColor. Under Windows, Qt creates a
- Windows palette if the display supports 256 colors.
- QApplication::CustomColor. Use this choice if your application
-
-
-
- very color hungry (e.g. it wants thousands of colors). Under
- Windows, this is equal to CustomColor. Under X11 the effect is:
- QApplication::ManyColor. Use this choice if your application is
-
- visual, the default visual is used, and a colors are allocated
- from a color cube. The color cube is the 6x6x6 (216 color) "Web
- palette", but the number of colors can be changed by the -_n_c_o_l_s
- option. The user can force the application to use the true color
- visual by the -visual option.
- For 256-
- color displays which have at best a 256 color true color
-
-
-
- Page 12 (printed 9/22/98)
-
-
-
-
-
-
- QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))
-
-
-
- than 256 colors, use that visual. Silicon Graphics X servers have
- this feature. They provide an 8 bit visual as default but can
- deliver true color when asked.
- For 256-
- color displays which have a true color visual with more
-
- Example:
-
- int main( int argc, char **argv )
- {
- QApplication::setColorSpec( QApplication::ManyColor );
- QApplication a( argc, argv );
- ...
- }
-
- QColor provides more functionality for controlling color
- allocation and freeing up certains colors. See
- QColor::enterAllocContext() for more information.
-
- To see what mode you end up with, you can call
- QColor::numBitPlanes() once the QApplication object exists.
- A value greater than 8 (typically 16, 24 or 32) means true
- color.
-
- The color cube used by Qt are all those colors with red,
- green, and blue components of either 0x00, 0x33, 0x66, 0x99,
- 0xCC, or 0xFF.
-
- See also: colorSpec(), QColor::numBitPlanes() and
- QColor::enterAllocContext().
-
- Examples: widgets/widgets.cpp
-
- vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::sssseeeettttDDDDoooouuuubbbblllleeeeCCCClllliiiicccckkkkIIIInnnntttteeeerrrrvvvvaaaallll (((( iiiinnnntttt mmmmssss )))) [[[[ssssttttaaaattttiiiicccc]]]]
- Sets the time limit that distinguishes a double click from
- two consecutive mouse clicks to _m_s milliseconds. This value
- is ignored under Windows (the control panel value is used.)
-
- The default value is 400 milliseconds.
-
- See also: doubleClickInterval().
-
- vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::sssseeeettttFFFFoooonnnntttt (((( ccccoooonnnnsssstttt QQQQFFFFoooonnnntttt &&&& ffffoooonnnntttt,,,, bbbboooooooollll
- uuuuppppddddaaaatttteeeeAAAAllllllllWWWWiiiiddddggggeeeettttssss====FFFFAAAALLLLSSSSEEEE )))) [[[[ssssttttaaaattttiiiicccc]]]]
- Changes the default application font to _f_o_n_t.
-
- The default font depends on the X server in use.
-
- If _u_p_d_a_t_e_A_l_l_W_i_d_g_e_t_s is TRUE, then the font of all existing
- widgets is set to _f_o_n_t.
-
- Widgets created after this call get _f_o_n_t as their font.
-
-
-
- Page 13 (printed 9/22/98)
-
-
-
-
-
-
- QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))
-
-
-
- See also: font(), fontMetrics() and QWidget::setFont().
-
- Examples: desktop/desktop.cpp movies/main.cpp
-
- vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::sssseeeettttGGGGlllloooobbbbaaaallllMMMMoooouuuusssseeeeTTTTrrrraaaacccckkkkiiiinnnngggg (((( bbbboooooooollll eeeennnnaaaabbbblllleeee ))))
- [[[[ssssttttaaaattttiiiicccc]]]]
- Enables global mouse tracking if _e_n_a_b_l_e is TRUE or disables
- it if _e_n_a_b_l_e is FALSE.
-
- Enabling global mouse tracking makes it possible for widget
- event filters or application event filters to get all mouse
- move events, even when no button is depressed. This is
- useful for special GUI elements, e.g. tool tips.
-
- Global mouse tracking does not affect widgets and their
- mouseMoveEvent(). For a widget to get mouse move events when
- no button is depressed, it must do
- QWidget::setMouseTracking(TRUE).
-
- This function has an internal counter. Each
- setGlobalMouseTracking(TRUE) must have a corresponding
- setGlobalMouseTracking(FALSE).
-
- See also: hasGlobalMouseTracking() and
- QWidget::hasMouseTracking().
-
- vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::sssseeeettttMMMMaaaaiiiinnnnWWWWiiiiddddggggeeeetttt (((( QQQQWWWWiiiiddddggggeeeetttt **** mmmmaaaaiiiinnnnWWWWiiiiddddggggeeeetttt ))))
- Sets the main widget of the application.
-
- The special thing about the main widget is that destroying
- the main widget (i.e. the program calls QWidget::close() or
- the user double-clicks the window close box) will leave the
- main event loop and exit the application.
-
- For X11, this function also resizes and moves the main
- widget according to the -_g_e_o_m_e_t_r_y command-line option, so
- you should set the default geometry before calling
- setMainWidget().
-
- See also: mainWidget(), exec() and quit().
-
- Examples: forever/forever.cpp connect/connect.cpp
- mainlyQt/editor.cpp drawdemo/drawdemo.cpp
- picture/picture.cpp xform/xform.cpp menu/menu.cpp
- progress/progress.cpp cursor/cursor.cpp layout/layout.cpp
- qmag/qmag.cpp widgets/widgets.cpp
-
- vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::sssseeeettttOOOOvvvveeeerrrrrrrriiiiddddeeeeCCCCuuuurrrrssssoooorrrr (((( ccccoooonnnnsssstttt QQQQCCCCuuuurrrrssssoooorrrr &&&& ccccuuuurrrrssssoooorrrr,,,,
- bbbboooooooollll rrrreeeeppppllllaaaacccceeee====FFFFAAAALLLLSSSSEEEE )))) [[[[ssssttttaaaattttiiiicccc]]]]
- Sets the application override cursor to _c_u_r_s_o_r.
-
- Application override cursor are intended for showing the
-
-
-
- Page 14 (printed 9/22/98)
-
-
-
-
-
-
- QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))
-
-
-
- user that the application is in a special state, for example
- during an operation that might take some time.
-
- This cursor will be displayed in all application widgets
- until restoreOverrideCursor() or another setOverrideCursor()
- is called.
-
- Application cursors are stored on an internal stack.
- setOverrideCursor() pushes the cursor onto the stack, and
- restoreOverrideCursor() pops the active cursor off the
- stack. Every setOverrideCursor() must have an corresponding
- restoreOverrideCursor(), otherwise the stack will get out of
- sync. overrideCursor() returns 0 if the cursor stack is
- empty.
-
- If _r_e_p_l_a_c_e is TRUE, the new cursor will replace the last
- override cursor.
-
- Example:
-
- QApplication::setOverrideCursor( waitCursor );
- calculateHugeMandelbrot(); // lunch time...
- QApplication::restoreOverrideCursor();
-
- See also: overrideCursor(), restoreOverrideCursor() and
- QWidget::setCursor().
-
- Examples: showimg/showimg.cpp
-
- vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::sssseeeettttPPPPaaaalllleeeetttttttteeee (((( ccccoooonnnnsssstttt QQQQPPPPaaaalllleeeetttttttteeee &&&& ppppaaaalllleeeetttttttteeee,,,, bbbboooooooollll
- uuuuppppddddaaaatttteeeeAAAAllllllllWWWWiiiiddddggggeeeettttssss====FFFFAAAALLLLSSSSEEEE )))) [[[[ssssttttaaaattttiiiicccc]]]]
- Changes the default application palette to _p_a_l_e_t_t_e.
-
- If _u_p_d_a_t_e_A_l_l_W_i_d_g_e_t_s is TRUE, then the palette of all
- existing widgets is set to _p_a_l_e_t_t_e.
-
- Widgets created after this call get _p_a_l_e_t_t_e as their
- palette.
-
- See also: QWidget::setPalette() and palette().
-
- Examples: xform/xform.cpp
-
- vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::sssseeeettttSSSSttttyyyylllleeee (((( GGGGUUUUIIIISSSSttttyyyylllleeee ssssttttyyyylllleeee )))) [[[[ssssttttaaaattttiiiicccc]]]]
- Sets the application GUI style to _s_t_y_l_e.
-
- The style parameter can be WindowsStyle or MotifStyle.
-
- See also: style() and QWidget::setStyle().
-
- vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::sssseeeettttWWWWiiiinnnnSSSSttttyyyylllleeeeHHHHiiiigggghhhhlllliiiigggghhhhttttCCCCoooolllloooorrrr (((( ccccoooonnnnsssstttt QQQQCCCCoooolllloooorrrr &&&& cccc ))))
- [[[[ssssttttaaaattttiiiicccc]]]]
-
-
-
- PPPPaaaaggggeeee 11115555 ((((pppprrrriiiinnnntttteeeedddd 9999////22222222////99998888))))
-
-
-
-
-
-
- QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))
-
-
-
- Sets the color used to mark selections in windows style for
- all widgets in the application. Will repaint all widgets if
- the color is changed.
-
- The default color is darkBlue.
-
- See also: winStyleHighlightColor().
-
- Examples: widgets/widgets.cpp
-
- bbbboooooooollll QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::ssssttttaaaarrrrttttiiiinnnnggggUUUUpppp (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
- Returns TRUE if an application object has not been created
- yet.
-
- See also: closingDown().
-
- GGGGUUUUIIIISSSSttttyyyylllleeee QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::ssssttttyyyylllleeee (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
- Returns the GUI style of the application.
-
- See also: setStyle().
-
- vvvvooooiiiidddd QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::ssssyyyynnnnccccXXXX (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
- Synchronizes with the X server in the X11 implementation.
- Does nothing on other platforms.
-
- See also: flushX().
-
- QQQQWWWWiiiiddddggggeeeettttLLLLiiiisssstttt **** QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::ttttooooppppLLLLeeeevvvveeeellllWWWWiiiiddddggggeeeettttssss (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
- Returns a list of the top level widgets in the application.
-
- The list is created using new and must be deleted by the
- caller.
-
- The list is empty if there are no top level widgets.
-
- Note that some of the top level widgets may be hidden.
-
- Example:
-
- //
- // Shows all hidden top level widgets.
- //
- QWidgetList *list = QApplication::topLevelWidgets();
- QWidgetListIt it( *list ); // iterate over the widgets
- while ( it.current() ) { // for each top level widget...
- if ( !it.current()->isVisible() )
- it.current()->show();
- ++it;
- }
- delete list; // delete the list, not the widgets
-
- The QWidgetList class is defined in the qwidcoll.h header
-
-
-
- Page 16 (printed 9/22/98)
-
-
-
-
-
-
- QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))
-
-
-
- file.
-
- WWWWaaaarrrrnnnniiiinnnngggg:::: Delete the list away as soon you have finished
- using it. You can get in serious trouble if you for instance
- try to access a widget that has been deleted.
-
- See also: allWidgets(), QWidget::isTopLevel(),
- QWidget::isVisible() and QList::isEmpty().
-
- QQQQWWWWiiiiddddggggeeeetttt **** QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::wwwwiiiiddddggggeeeettttAAAAtttt (((( iiiinnnntttt xxxx,,,, iiiinnnntttt yyyy,,,, bbbboooooooollll cccchhhhiiiilllldddd====FFFFAAAALLLLSSSSEEEE
- )))) [[[[ssssttttaaaattttiiiicccc]]]]
- Returns a pointer to the widget at global screen position
- (_x,_y), or a null pointer if there is no Qt widget there.
-
- If _c_h_i_l_d is FALSE and there is a child widget at position
- (_x,_y), the top-level widget containing it is returned. If
- _c_h_i_l_d is TRUE the child widget at position (_x,_y) is
- returned.
-
- See also: QCursor::pos(), QWidget::grabMouse() and
- QWidget::grabKeyboard().
-
- QQQQWWWWiiiiddddggggeeeetttt **** QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::wwwwiiiiddddggggeeeettttAAAAtttt (((( ccccoooonnnnsssstttt QQQQPPPPooooiiiinnnntttt &&&& ppppoooossss,,,, bbbboooooooollll
- cccchhhhiiiilllldddd====FFFFAAAALLLLSSSSEEEE )))) [[[[ssssttttaaaattttiiiicccc]]]]
- This is an overloaded member function, provided for
- convenience. It differs from the above function only in what
- argument(s) it accepts.
-
- ccccoooonnnnsssstttt QQQQCCCCoooolllloooorrrr&&&& QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn::::::::wwwwiiiinnnnSSSSttttyyyylllleeeeHHHHiiiigggghhhhlllliiiigggghhhhttttCCCCoooolllloooorrrr (((()))) [[[[ssssttttaaaattttiiiicccc]]]]
- Returns the color used to mark selections in windows style.
-
- See also: setWinStyleHighlightColor().
-
- RRRREEEELLLLAAAATTTTEEEEDDDD FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDOOOOCCCCUUUUMMMMEEEENNNNTTTTAAAATTTTIIIIOOOONNNN
- vvvvooooiiiidddd qqqqAAAAddddddddPPPPoooossssttttRRRRoooouuuuttttiiiinnnneeee ((((CCCClllleeeeaaaannnnUUUUppppFFFFuuuunnnnccccttttiiiioooonnnn pppp))))
- Adds a global routine that will be called from the
- QApplication destructor. This function is normally used to
- add cleanup routines.
-
- CleanUpFunctions is defined as typedef void
- (*CleanUpFunction)(); , i.e. a pointer to a function that
- takes no arguments and returns nothing.
-
- Example of use:
-
- static int *global_ptr = 0;
- void cleanup_ptr()
- {
- delete [] global_ptr;
- }
- void init_ptr()
- {
-
-
-
- Page 17 (printed 9/22/98)
-
-
-
-
-
-
- QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))
-
-
-
- global_ptr = new int[100]; // allocate data
- qAddPostRoutine( cleanup_ptr ); // delete later
- }
-
- ccccoooonnnnsssstttt cccchhhhaaaarrrr **** qqqqVVVVeeeerrrrssssiiiioooonnnn (((())))
- Returns the Qt version number for the library, typically
- "1.30" or "1.31".
-
- bbbboooooooollll qqqqSSSSyyyyssssIIIInnnnffffoooo ((((iiiinnnntttt **** wwwwoooorrrrddddSSSSiiiizzzzeeee,,,, bbbboooooooollll **** bbbbiiiiggggEEEEnnnnddddiiiiaaaannnn))))
- Obtains information about the system.
-
- The system's word size in bits (typically 32) is returned in
- *_w_o_r_d_S_i_z_e. The *_b_i_g_E_n_d_i_a_n is set to TRUE if this is a big-
- endian machine, or to FALSE if this is a little-endian
- machine.
-
- This function calls fatal() with a message if the computer
- is truely weird (i.e. different endianness for 16 bit and 32
- bit integers).
-
- vvvvooooiiiidddd ddddeeeebbbbuuuugggg ((((ccccoooonnnnsssstttt cccchhhhaaaarrrr **** mmmmssssgggg,,,, ............))))
- Prints a debug message, or calls the message handler (if it
- has been installed).
-
- This function takes a format string and a stack arguments,
- similar to the C printf() function.
-
- Example:
-
- debug( "my window handle = %x", myWidget->id() );
-
- Under X11, the text is printed to stderr. Under Windows, the
- text is sent to the debugger.
-
- WWWWaaaarrrrnnnniiiinnnngggg:::: The internal buffer is limited to 512 bytes
- (including the 0-terminator.
-
- See also: warning(), fatal(), qInstallMsgHandler() and
- Debugging
-
- vvvvooooiiiidddd wwwwaaaarrrrnnnniiiinnnngggg ((((ccccoooonnnnsssstttt cccchhhhaaaarrrr **** mmmmssssgggg,,,, ............))))
- Prints a warning message, or calls the message handler (if
- it has been installed).
-
- This function takes a format string and a stack arguments,
- similar to the C printf() function.
-
- Example:
-
- void f( int c )
- {
- if ( c > 200 )
-
-
-
- Page 18 (printed 9/22/98)
-
-
-
-
-
-
- QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))
-
-
-
- warning( "f: bad argument, c == %d", c );
- }
-
- Under X11, the text is printed to stderr. Under Windows, the
- text is sent to the debugger.
-
- WWWWaaaarrrrnnnniiiinnnngggg:::: The internal buffer is limited to 512 bytes
- (including the 0-terminator.
-
- See also: debug(), fatal(), qInstallMsgHandler() and
- Debugging
-
- Examples: progress/progress.cpp
-
- vvvvooooiiiidddd ffffaaaattttaaaallll ((((ccccoooonnnnsssstttt cccchhhhaaaarrrr **** mmmmssssgggg,,,, ............))))
- Prints a fatal error message and exits, or calls the message
- handler (if it has been installed).
-
- This function takes a format string and a stack arguments,
- similar to the C printf() function.
-
- Example:
-
- int divide( int a, int b )
- {
- if ( b == 0 ) // program error
- fatal( "divide: cannot divide by zero" );
- return a/b;
- }
-
- Under X11, the text is printed to stderr. Under Windows, the
- text is sent to the debugger.
-
- WWWWaaaarrrrnnnniiiinnnngggg:::: The internal buffer is limited to 512 bytes
- (including the 0-terminator.
-
- See also: debug(), warning(), qInstallMsgHandler() and
- Debugging
-
- vvvvooooiiiidddd AAAASSSSSSSSEEEERRRRTTTT ((((bbbboooooooollll tttteeeesssstttt))))
- Prints a warning message containing the source code file
- name and line number if _t_e_s_t is FALSE.
-
- This is really a macro defined in qglobal.h.
-
- ASSERT is useful for testing required conditions in your
- program.
-
- Example:
-
- //
- // File: div.cpp
-
-
-
- Page 19 (printed 9/22/98)
-
-
-
-
-
-
- QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))
-
-
-
- //
- #include <qglobal.h>
- int divide( int a, int b )
- {
- ASSERT( b != 0 ); // this is line 9
- return a/b;
- }
-
- If b is zero, the ASSERT statement will output the following
- message using the warning() function:
-
- ASSERT: "b == 0" in div.cpp (9)
-
- See also: warning() and Debugging
-
- vvvvooooiiiidddd CCCCHHHHEEEECCCCKKKK____PPPPTTTTRRRR ((((vvvvooooiiiidddd **** pppp))))
- If _p is null, a fatal messages says that the program ran out
- of memory and exits. If _p is not null, nothing happens.
-
- This is really a macro defined in qglobal.h.
-
- WWWWaaaarrrrnnnniiiinnnngggg:::: CHECK_PTR only works for the development release of
- the Qt library. In the release library, CHECK_PTR will be
- substituted with nothing.
-
- Example:
-
- int *a;
- CHECK_PTR( a = new int[80] ); // never do this!
- // do this instead:
- a = new int[80];
- CHECK_PTR( a ); // this is fine
-
- See also: fatal() and Debugging
-
- mmmmssssgggg____hhhhaaaannnnddddlllleeeerrrr qqqqIIIInnnnssssttttaaaallllllllMMMMssssggggHHHHaaaannnnddddlllleeeerrrr ((((mmmmssssgggg____hhhhaaaannnnddddlllleeeerrrr hhhh))))
- Installs a Qt message handler. Returns a pointer to the
- message handler previously defined.
-
- The message handler is a function that prints out debug
- messages, warnings and fatal error messages. The Qt library
- (debug version) contains hundreds of warning messages that
- are printed when internal errors (usually invalid function
- arguments) occur. If you implement your own message handler,
- you get total control of these messages.
-
- The default message handler prints the message to the
- standard output under X11 or to the debugger under Windows.
- If it is a fatal message, the application aborts
- immediately.
-
- Only one message handler can be defined, since this is
-
-
-
- Page 20 (printed 9/22/98)
-
-
-
-
-
-
- QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQAAAApppppppplllliiiiccccaaaattttiiiioooonnnn((((3333qqqqtttt))))
-
-
-
- usually done on an application-wide basis to control debug
- output.
-
- To restore the message handler, call qInstallMsgHandler(0).
-
- Example:
-
- #include <qapplication.h>
- #include <stdio.h>
- #include <stdlib.h>
- void myMessageOutput( QtMsgType type, const char *msg )
- {
- switch ( type ) {
- case QtDebugMsg:
- fprintf( stderr, "Debug: %s\n", msg );
- break;
- case QtWarningMsg:
- fprintf( stderr, "Warning: %s\n", msg );
- break;
- case QtFatalMsg:
- fprintf( stderr, "Fatal: %s\n", msg );
- abort(); // dump core on purpose
- }
- }
- int main( int argc, char **argv )
- {
- qInstallMsgHandler( myMessageOutput );
- QApplication a( argc, argv );
- ...
- return a.exec();
- }
-
- See also: debug(), warning(), fatal() and Debugging
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- hhhhttttttttpppp::::////////wwwwwwwwwwww....ttttrrrroooollllllll....nnnnoooo////qqqqtttt////qqqqaaaapppppppplllliiiiccccaaaattttiiiioooonnnn....hhhhttttmmmmllll
-
- CCCCOOOOPPPPYYYYRRRRIIIIGGGGHHHHTTTT
- Copyright 1992-1997 Troll Tech AS. See the LICENSE file
- included in the distribution for a complete license
- statement.
-
- AAAAUUUUTTTTHHHHOOOORRRR
- Generated automatically from the source code.
-
-
-
-
-
-
-
-
-
-
-
- Page 21 (printed 9/22/98)
-
-
-
-